<template>
  <QuillEditor v-model:content="content"  content-type="html"  toolbar="full" @editorChange="save" theme="snow"/>
</template>

<script>
import { QuillEditor } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css';
export default {
  props: {
    modelValue: String,
  },
  data(){
    return{
      content:""
    }
  },
  components:{QuillEditor},
  created() {
    if (this.modelValue){
      this.content = this.modelValue
    }
  },
  methods:{
    save(){
      this.$emit('update:modelValue', this.content)
    }
  }
}
</script>

<style scoped>
.QuillEditor{
  height: 500px;
}
</style>